From 2a022479a2cf44b2de5b79bc1865d7224eb79d0c Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 22 Feb 2005 15:04:00 +0000 Subject: [PATCH] bitkeeper revision 1.1236 (421b49e0jUTlkllzShzryRgPs9Q-vg) Fix x86/64 build. Signed-off-by: Keir Fraser --- xen/arch/x86/shadow.c | 13 ++++++++++--- xen/include/asm-x86/domain.h | 6 +++--- xen/include/asm-x86/shadow.h | 9 --------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c index 68243dd511..43157e6d6a 100644 --- a/xen/arch/x86/shadow.c +++ b/xen/arch/x86/shadow.c @@ -453,7 +453,12 @@ void unshadow_table(unsigned long gpfn, unsigned int type) free_shadow_page(d, &frame_table[smfn]); } -#ifdef CONFIG_VMX +/* + * XXX KAF: + * 1. Why is this VMX specific? + * 2. Why is VMX using clear_state() rather than free_state()? + * (could we get rid of clear_state and fold into free_state?) + */ void vmx_shadow_clear_state(struct domain *d) { SH_VVLOG("vmx_clear_shadow_state:"); @@ -461,8 +466,6 @@ void vmx_shadow_clear_state(struct domain *d) clear_shadow_state(d); shadow_unlock(d); } -#endif - unsigned long shadow_l2_table( struct domain *d, unsigned long gmfn) @@ -582,6 +585,10 @@ void shadow_invlpg(struct exec_domain *ed, unsigned long va) ASSERT(shadow_mode_enabled(ed->domain)); + /* + * XXX KAF: Why is this set-to-zero required? + * Why, on failure, must we bin all our shadow state? + */ if (__put_user(0L, (unsigned long *) &shadow_linear_pg_table[va >> PAGE_SHIFT])) { vmx_shadow_clear_state(ed->domain); diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h index 31a3dfa8f7..06da92b3d7 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -91,9 +91,9 @@ struct arch_exec_domain struct desc_struct fast_trap_desc; #endif trap_info_t traps[256]; -#ifdef CONFIG_VMX - struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */ -#endif + + /* Virtual Machine Extensions */ + struct arch_vmx_struct arch_vmx; /* * Every domain has a L1 pagetable of its own. Per-domain mappings diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h index 696ab786a6..f29945142a 100644 --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -7,10 +7,7 @@ #include #include #include - -#ifdef CONFIG_VMX #include -#endif /* Shadow PT flag bits in pfn_info */ #define PSH_shadowed (1<<31) /* page has a shadow. PFN points to shadow */ @@ -48,9 +45,7 @@ extern int shadow_mode_enable(struct domain *p, unsigned int mode); extern void free_shadow_state(struct domain *d); extern void shadow_invlpg(struct exec_domain *, unsigned long); -#ifdef CONFIG_VMX extern void vmx_shadow_clear_state(struct domain *); -#endif #define __mfn_to_gpfn(_d, mfn) \ ( (shadow_mode_translate(_d)) \ @@ -654,8 +649,6 @@ static inline void set_shadow_status( shadow_audit(d, 0); } -#ifdef CONFIG_VMX - static inline unsigned long gva_to_gpte(unsigned long gva) { unsigned long gpde, gpte, pfn, index; @@ -691,8 +684,6 @@ static inline unsigned long gva_to_gpa(unsigned long gva) return (gpte & PAGE_MASK) + (gva & ~PAGE_MASK); } -#endif /* CONFIG_VMX */ - static inline void __update_pagetables(struct exec_domain *ed) { struct domain *d = ed->domain; -- 2.30.2